import pandas as pd


def load():
    df = pd.read_csv("./output/total_workload.csv", encoding="utf-8")
    df["workload"] = df.apply(
        lambda row: (
            row["count"] * 2 / 8 if row["task-type"] == "coding" else row["count"] / 8
        ),
        axis=1,
    )
    return df.to_dict("records")


# print(
#     tasks_df[tasks_df["developer"] == "许舒晨"]
#     .groupby(["developer", "publishSprint"])["workload"]
#     .sum()
#     .to_frame()
#     .reset_index()
# )
